import { Quasar } from 'quasar';
import {
  Cookies,
  Dark,
  Notify,
  LocalStorage,
  AppFullscreen,
  Loading,
  LoadingBar,
  Dialog,
  QSpinnerGears,
} from 'quasar';

import '@quasar/extras/material-icons/material-icons.css';
import 'quasar/src/css/index.sass';
import quasarLang from 'quasar/lang/zh-CN';
// import { QBtn } from 'quasar';
import '@quasar/extras/animate/rotateIn.css'
import '@quasar/extras/animate/rotateOut.css'
import '@quasar/extras/animate/fadeIn.css'
import '@quasar/extras/animate/fadeOut.css'

export default {
  install: (app, cfg) => {
    app.use(
      Quasar,
      {
        lang: quasarLang,
        plugins: {
          AppFullscreen,
          Dark,
          Cookies,
          Notify,
          LocalStorage,
          Loading,
          LoadingBar,
          Dialog,
        },
        config: {
          brand: {
            // primary: '#e46262',
            // ... or all other brand colors
          },
          notify: {}, // default set of options for Notify Quasar plugin
          loading: { spinner: QSpinnerGears, message: '系统加载中……' }, // default set of options for Loading Quasar plugin
          loadingBar: { color: 'red', size: '4px', position: 'top' }, // settings for LoadingBar Quasar plugin
          // ..and many more (check Installation card on each Quasar component/directive/plugin)
        },
      },
      // 下面的不加的话,vitepress build的时候会报错
      {
        req: {
          headers: {},
        },
      },
    );

    // app.component("QBtn", QBtn);
  },
};
